#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  ll mysum=1;
  ll n=0;
  cin>>n;
  ll i=1;
  ll ret=1;
  while(mysum<n)
  {
    mysum+=i*3;
    i*=3;
    ret++; 
  }
  cout<<ret;
  return 0;
}
